package com.qys.livesMall.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.shop.modal.dto.AddPurchaseCartDTO;
import com.qys.livesMall.shop.modal.dto.QueryPurchaseCartDTO;
import com.qys.livesMall.shop.modal.entity.PurchaseCart;
import com.qys.livesMall.shop.modal.vo.PurchaseCartVO;

import java.util.List;

/**
 * 用户采购购物车(PurchaseCart)表服务接口
 *
 * @author makejava
 * @since 2023-08-28 11:10:38
 */
public interface PurchaseCartService extends IService<PurchaseCart> {

    /**
     * 分页查询用户的采购购物车
     * @param userId
     * @param dto
     * @return
     */
    IPage<PurchaseCartVO> selectAll(Long userId, QueryPurchaseCartDTO dto);

    /**
     * 添加至采购购物车
     * @param dto
     */
    void add(AddPurchaseCartDTO dto);

    /**
     * 删除用户的采购购物车中某一条商品
     * @param id 数据id
     */
    void removePurchaseCart(List<Long> id);
}

